import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入路由
import router from './router'
//引入路由守卫
import './permisstion'
//引入自定义指令文件
import {isHasButton} from '@/directives/has.ts';

const app = createApp(App);

app.use(createPinia());
app.use(ElementPlus);
//安装路由
app.use(router);

// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
isHasButton(app);
app.mount('#app');
